package com.ms.seguridad.support;

import java.io.Serializable;
import java.util.List;

/**
 * User: gmc
 * Date: 30/04/13
 */
public class ModuloInfo implements Serializable {
    private String id;
    private String name;
    private MenuInfo defaultMenuInfo;
    private List<MenuInfo> menuInfoList;
    private String descripcion;

    public ModuloInfo() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<MenuInfo> getMenuInfoList() {
        return menuInfoList;
    }

    public void setMenuInfoList(List<MenuInfo> menuInfoList) {
        this.menuInfoList = menuInfoList;
    }

    public String getDefaultPage() {
        MenuInfo menuInfo = getDefaultMenuInfo();
        return menuInfo.getDefaultPage();
    }

    public MenuInfo getDefaultMenuInfo() {
        if (defaultMenuInfo == null) {
            defaultMenuInfo = menuInfoList.get(0);
        }
        return defaultMenuInfo;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public String getDescripcion() {
        return descripcion;
    }
}
